package com.doudou.getway.controller;

import com.doudou.getway.service.GatewayConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: 傻男人
 * @Date: 2020/4/7
 * @Description:
 */
@RestController
@RequestMapping("/refresh")
public class RefreshController {

    @Autowired
    private GatewayConfigService gatewayConfigService;

    @GetMapping("/config")
    public String refresh(){
        gatewayConfigService.initAllRoute();
        return "Success";
    }
}
